package d6_thread_pool;

import java.util.concurrent.*;

/**
 * 2024/6/24 掌握线程池的创建
 */
public class ThreadPollTest2 {
    public static void main(String[] args) {
        //1.通过ThreadPoolExecutor 创建一个线程池对象
 /*       ExecutorService pool =new ThreadPoolExecutor(3,5,8, TimeUnit.SECONDS,
                new ArrayBlockingQueue<>(4), Executors.defaultThreadFactory(),
                new ThreadPoolExecutor.CallerRunsPolicy());*/

        //1.通过Executors创建一个线程池对象
        ExecutorService pool = Executors.newFixedThreadPool(3);


    }
}
